/* mvnbuild.groovy
    ##################################################
    # Created by zy                        #
    # Plugin install:  build user vars, maven node build                                                #
    # A Part of the Project jenkins-library          #
    ##################################################
*/
package org.devops

def mavenbuild(mavenEnvParameter) {
    private cmd = """
          # cp -f settings.xml /root/.m2/settings.xml
          #sed -i 's/nexus.dispute.bangying.tech/nexus.devops:8081/g' ~/.m2/settings.xml
          mvn dependency:go-offline -B
          # rm -rf /root/.m2/repository/com/univer
          mvn -T 1C  clean package -Dmaven.test.skip=true  $mavenEnvParameter"""
    sh(cmd)
}

def mavencloudbuild(mavenEnvParameter) {
    // 同一个仓库下所有项目全部build
    private cmd = """
          #sed -i 's/nexus.dispute.bangying.tech/nexus.devops:8081/g' ~/.m2/settings.xml
          mvn -T 1C  clean package -Dmaven.test.skip=true $mavenEnvParameter"""
    sh(cmd)
}
